<?php
declare (strict_types=1);

namespace app\common\model;

use ffhome\frame\model\BaseModel;
use think\facade\Db;

class TourTourist extends BaseModel
{
    const MODEL_NAME = 'tour_tourist';

    public static function add(array $tourist)
    {
        Db::name(self::MODEL_NAME)->insert($tourist);
    }

    public static function getListByEnrollId($enrollId)
    {
        return Db::name(self::MODEL_NAME)->withoutField('enroll_id')->where('enroll_id', $enrollId)
            ->order('id', 'asc')->select()->toArray();
    }
}